/*
This file is part of Docking@Home.
http://docking.gcl.cis.udel.edu
Copyright (C) 2009 University of Delaware

Docking@Home is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Docking@Home is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Docking@Home.  If not, see <http://www.gnu.org/licenses/>.
*/
/*
	Filename: Logo.cpp
	Description: Used to display the Docking@Home Logo
	Revision History: 
		Created - 01/02/08
	Author: Robert Keller
*/

#include "Logo.h"

#include "parse.h"
#include "gutil.h"
#include "boinc_gl.h"
#include "graphics_api.h"
#include "txf_util.h"

// ------------------------------------------------------------
// Static Declarations
// ------------------------------------------------------------

GLHelper * Logo::glHelper;

// ------------------------------------------------------------
// Constructor / Destructor
// ------------------------------------------------------------

Logo::Logo ()
{
}

Logo::Logo (const char path [MAX_PATH_LENGTH])
{
	loadLogo(path);
}

Logo::~Logo ()
{
}

// ------------------------------------------------------------
// Loading Functions
// ------------------------------------------------------------

void Logo::loadLogo (const char path [MAX_PATH_LENGTH])
{
	logo.load_image_file(path);
	
}// loadLogo

// ------------------------------------------------------------
// Rendering Functions
// ------------------------------------------------------------

void Logo::draw (float x, float y, float width, float height)
{
	if (logo.present) 
	{	
		glHelper->drawTexturedQuadWH(x, y, width, height, 
			glHelper->WHITE, logo.id);
    }// if
}
